const mockjs = require('mockjs');
const WUHAN_BUILDING = require('./src/assets/geoJson/Wuhan_Buildings.json');
const WUHAN_ROADS = require('./src/assets/geoJson/Wuhan_roads.json');
const WUHAN_EVENTS = require('./src/assets/geoJson/Wuhan_events.json');
const WUHAN_BRIDGE = require('./src/assets/geoJson/Wuhan_bridge.json');

module.exports = () => {
  return mockjs.mock({
    WUHAN_BUILDING,
    WUHAN_ROADS,
    WUHAN_EVENTS,
    WUHAN_BRIDGE,
  });
};

// module.exports = () => {
//   const simplifiedBuildings = WUHAN_BUILDING.features.slice(0, 10).map(feature => ({
//     type: feature.type,
//     geometry: feature.geometry,
//     properties: {
//       Entity: feature.properties.Entity,
//       Color: feature.properties.Color,
//       Elevation: feature.properties.Elevation,
//     },
//   }));

//   return mockjs.mock({
//     WUHAN_BUILDING: {
//       type: 'FeatureCollection',
//       features: simplifiedBuildings,
//     },
//     WUHAN_ROADS,
//   });
// };
